package com.ithuameng.notice.util;

import lombok.Data;

import java.io.Serializable;

@Data
public class R<T> implements Serializable {

    private static final long serialVersionUID = 8608128507726127890L;

    private boolean result;

    private Integer code;

    private String message;

    private T data;

    public R(boolean result, Integer code, String message, T data) {
        this.result = result;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public R(T data) {
        this.result = true;
        this.code = 200;
        this.data = data;
    }
}
